﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TemplateEdit.aspx.cs" Inherits="Card.Manager.TemplateEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>名片编辑</title>
    <link href="Css/Style.css" rel="Stylesheet" type="text/css" />
    <link href="Css/mp.css" rel="Stylesheet" type="text/css" />
    <link href="Css/smoothness/jquery-ui-1.9.2.custom.min.css" rel="Stylesheet" type="text/css" />
    <link href="Css/evol.colorpicker.css" rel="Stylesheet" type="text/css" />

    <script type="text/javascript">
        var arVersion = navigator.appVersion.split("MSIE");
        var version = parseFloat(arVersion[1]);
        var imgServer = '<%=Card.Utility.ImageUtilty.ImageServer + "/" %>'; 
    </script>

    <script src="JavaScript/jquery-1.8.3.min.js" type="text/javascript"></script>

    <script src="JavaScript/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script>

    <script src="JavaScript/evol.colorpicker.min.js" type="text/javascript"></script>

    <script src="JavaScript/common.js" type="text/javascript"></script>
    
    <script src="JavaScript/design.js" type="text/javascript"></script>    
    

    <script type="text/javascript">
        function upload_sucess(photo) {
            window.location = window.location;
        }

        function modifyImage(t) {

            var url = "Upload.aspx?uit=t&id=<%=this.TemplateID %>&s=" + $("input[name='rdbStyle']:checked").val();
            if (t == "front") {
                url += "&it=f";
            } else {
                url += "&it=b";
            }

            window.open(url, "Upload", "width=400px,height=200px,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no");
        }


        function toggleFields(t) {
            if (t == "back") {
                $("#trFrontFields").hide();
                $("#trBackFields").show();
            } else {
                $("#trFrontFields").show();
                $("#trBackFields").hide();
            }
        }

        function changeStyle() {
            if ($("input[name='rdbStyle']:checked").val() == "V") {
                $("#card_front")[0].className = "card_vertical";
                $("#card_back")[0].className = "card_vertical";
            } else {
                $("#card_front")[0].className = "card";
                $("#card_back")[0].className = "card";
            }
        }

        function createThumbnail(id) {
            var url = '<%=Card.Utility.ImageUtilty.ImageServer + "/ImageService.ashx?a=ct&id=" %>' + id;
            $.get("Handler.ashx?url=" + escape(url), function(data) {
                var result = eval("(" + data + ")");
                if (result.r == "y") {
                    alert("生成成功");
                } else {
                    alert(result.msg);
                }
            });
        }
        
        function dragField(field) {
            $(field).draggable({ stop: function() {
                    var id = $(this).attr("id").replace("_img","");
                    var lblID = $("span[id$=_lblID]").filter(function(){ return $(this).text() == id }).first();
                    if(lblID.length >= 1)
                    {
                        var idPrefix = lblID.attr("id").replace("lblID", "");
                        var txtTop = $("#"+idPrefix+"txtTop_"+lblID.attr("ft"));
                        var txtLeft = $("#"+idPrefix+"txtLeft_"+lblID.attr("ft"));
                        txtTop.val($(this).css("top").replace("px", ""));
                        if($("#"+idPrefix+"rdbDirection_"+ lblID.attr("ft")+"_1").is(":checked")){
                            txtLeft.val(new Number(accAdd($(this).css("left").replace("px", ""), $(this).css("width").replace("px", ""))).toFixed(0));                            
                        }else{
                            txtLeft.val($(this).css("left").replace("px", ""));
                        }                     
                    }
                }
            });

            $(field).hover(
                            function() { $(this).css("cursor", "move") },
                            function() { $(this).css("cursor", "hand") }
                        );
        }

        function dragLogo() {
            $("img[id$=LImg]").each(function() {
                $(this).draggable({ stop: function() {
                       var ft = $.trim($(this).attr("id").replace("LImg",""));
                       $("#txtLogoLeft" + ft).val($(this).css("left").replace("px", ""));
                       $("#txtLogoTop" + ft).val($(this).css("top").replace("px", ""));

                }
                });
                $(this).hover(
                            function() { $(this).css("cursor", "move") },
                            function() { $(this).css("cursor", "hand") }
                        );
            });
        }
        
        $(document).ready(function() {
            $("input[id$=txtColor_front]").each(function() {
                $(this).colorpicker({ history: true }).on("change.color", function(event, color) {
                    loadfiled(this,"txtColor_"+$(this).attr("ft"),$(this).attr("ft"),color);
                });
            });

            $("input[id$=txtColor_back]").each(function() {
                $(this).colorpicker({ history: true }).on("change.color", function(event, color) {
                    loadfiled(this,"txtColor_"+$(this).attr("ft"),$(this).attr("ft"),color);
                });
            });
            
            $("#tabs").tabs();
            
            $("img[id$=_img]").each(function() {
                dragField(this);
            });

            dragLogo();

        });
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table class="TB">
            <tr>
                <td class="TD_Input_Text">
                    名称
                </td>
                <td class="TD_Input">
                    <asp:TextBox ID="txtName" CssClass="Input_Middle" runat="server"></asp:TextBox>
                </td>
                <td class="TD_Input_Text">
                    类别
                </td>
                <td class="TD_Input">
                    <asp:DropDownList ID="dropType" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="TD_Input_Text">
                    颜色
                </td>
                <td class="TD_Input">
                    <asp:DropDownList ID="dropColor" runat="server">
                    </asp:DropDownList>
                </td>
                <td class="TD_Input_Text">
                    板式
                </td>
                <td class="TD_Input">
                    <asp:RadioButtonList ID="rdbStyle" RepeatDirection="Horizontal" runat="server">
                        <asp:ListItem Value="H" onclick="changeStyle();" Selected="True">横版</asp:ListItem>
                        <asp:ListItem onclick="changeStyle();" Value="V">竖版</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td class="TD_Input_Text">
                    状态
                </td>
                <td class="TD_Input" colspan="3">
                    <asp:RadioButtonList ID="rdbStatus" RepeatDirection="Horizontal" runat="server">
                        <asp:ListItem Value="B" Selected="True">建设中</asp:ListItem>
                        <asp:ListItem Value="Y">启用</asp:ListItem>
                        <asp:ListItem Value="N">禁用</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td align="center" colspan="4">
                    <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" />
                    <input type="button" value="生成缩略图" onclick="javascript:void(0);createThumbnail('<%=this.TemplateID %>');" />
                    <input type="button" value="返回" onclick="javascript:window.location='TemplateManager.aspx';" />
                </td>
            </tr>
        </table>
        <table class="TB" id="fields" runat="server">
            <tr>
                <td>
                    <div id="tabs">
                        <ul>
                            <li><a href="#tabs-1">正面</a></li>
                            <li><a href="#tabs-2">反面</a></li>
                        </ul>
                        <div id="tabs-1">
                            <table class="TB">
                                <tr class="TB_Header">
                                    <td align="left">
                                        正面图片[<a href="javascript:void(0);modifyImage('front');">修改</a>]：尺寸比例5*3，建议上传原图图片尺寸为1000*600（原图尺寸要大于400*240，系统会自动生成400*240小图供用名设计名片用）
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <div id="card_front" runat="server">
                                            <ul>
                                                <li id="li_card_front">
                                                    <asp:Image ID="frontImg" runat="server" Style="border: 0px;" />
                                                    <asp:Literal ID="ltlFLogo" runat="server"></asp:Literal>
                                                </li>
                                            </ul>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table class="TB">
                                            <tr>
                                                <td class="TD_Input_Text" style="width: 70px;" valign="middle">
                                                    正面LOGO
                                                </td>
                                                <td rowspan="2" class="TD_Input" style="width: 50px;">
                                                    <asp:Image ID="FLogo" ImageUrl="/transparent.gif" Width="50px" Height="50px" runat="server" />
                                                </td>
                                                <td class="TD_Input" style="width: 200px;">
                                                    宽：<asp:TextBox ID="txtLogoWidthF" onkeyup="settingLogo('F',this);" Width="30px" MaxLength="3"
                                                        runat="server"></asp:TextBox>px 上边距：<asp:TextBox ID="txtLogoTopF" onkeyup="settingLogo('F',this);"
                                                            Width="30px" MaxLength="3" runat="server"></asp:TextBox>px
                                                    <asp:TextBox ID="txtLogoF" runat="server" Style="display: none"></asp:TextBox>
                                                </td>
                                                <td rowspan="2">
                                                    <asp:Button ID="btnSaveFLogo" runat="server" Text="保存" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="TD_Input_Text">
                                                    [<a href="javascript:void(0);picklogo('F');">修改</a>][<asp:LinkButton ID="lbtnDeleteFLogo"
                                                        CommandArgument="F" runat="server">删除</asp:LinkButton>]
                                                </td>
                                                <td class="TD_Input">
                                                    高：<asp:TextBox ID="txtLogoHeightF" onkeyup="settingLogo('F',this);" Width="30px"
                                                        MaxLength="3" runat="server"></asp:TextBox>px 左边距：<asp:TextBox ID="txtLogoLeftF"
                                                            onkeyup="settingLogo('F',this);" Width="30px" MaxLength="3" runat="server"></asp:TextBox>px
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr id="trFrontFields">
                                    <td>
                                        <fieldset>
                                            <legend>【正面字段详情】</legend>
                                            <asp:Repeater ID="rptFrontFieldList" runat="server">
                                                <HeaderTemplate>
                                                    <table class="TB">
                                                        <tr class="TB_Header">
                                                            <td style="width: 40px;">
                                                                ID
                                                            </td>
                                                            <td style="width: 60px;">
                                                                排序
                                                            </td>
                                                            <td style="width: 90px;">
                                                                字体
                                                            </td>
                                                            <td style="width: 60px;">
                                                                颜色
                                                            </td>
                                                            <td style="width: 70px;">
                                                                字符尺寸
                                                            </td>
                                                            <td style="width: 70px;">
                                                                上边距
                                                            </td>
                                                            <td style="width: 70px;">
                                                                左边距
                                                            </td>
                                                            <td style="width: 120px;">
                                                                文字方向
                                                            </td>
                                                            <td>
                                                                内容
                                                            </td>
                                                            <td style="width: 80px;">
                                                                操作
                                                            </td>
                                                        </tr>
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <tr class="TB_Alter front">
                                                        <td>
                                                            <asp:Label ID="lblID" ft="front" runat="server" Text='<%# Eval("ID") %>'></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtSort_front" CssClass="Input_Short" runat="server" Text='<%# Eval("SORT") %>'
                                                                MaxLength="10"></asp:TextBox>
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="dropFontFamily_front" Width="90px" DataSource='<%# this.FontFamily %>'
                                                                onchange="loadfiled(this,'dropFontFamily_front','front')" DataTextField="Value"
                                                                DataValueField="LookupCode" runat="server">
                                                            </asp:DropDownList>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtColor_front" CssClass="Input_Short" runat="server" Text='<%# Eval("COLOR") %>'
                                                                onkeyup="loadfiled(this,'txtColor_front','front')" ft="front" MaxLength="10"></asp:TextBox>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtFontSize_front" CssClass="Input_Short" onkeyup="loadfiled(this,'txtFontSize_front','front')"
                                                                runat="server" Text='<%# Eval("FONT_SIZE") %>' MaxLength="3"></asp:TextBox>px
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtTop_front" CssClass="Input_Short" runat="server" Text='<%# Eval("POS_Y") %>'
                                                                onkeyup="loadfiled(this,'txtTop_front','front')" MaxLength="3"></asp:TextBox>px
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtLeft_front" CssClass="Input_Short" runat="server" Text='<%# Eval("POS_X") %>'
                                                                onkeyup="loadfiled(this,'txtLeft_front','front')" MaxLength="3"></asp:TextBox>px
                                                        </td>
                                                        <td>
                                                            <asp:RadioButtonList ID="rdbDirection_front" RepeatDirection="Horizontal" runat="server"
                                                                onclick="loadfiled(this,'rdbDirection_front','front')">
                                                                <asp:ListItem Selected="True" Value="R">向右</asp:ListItem>
                                                                <asp:ListItem Value="L">向左</asp:ListItem>
                                                            </asp:RadioButtonList>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtContent_front" runat="server" CssClass="Input_Middle" Text='<%# Eval("CONTENT") %>'
                                                                onkeyup="loadfiled(this,'txtContent_front','front')" Width="90%" MaxLength="125"></asp:TextBox>
                                                        </td>
                                                        <td align="center">
                                                            <asp:LinkButton ID="lbtnSave" CommandName="UPDATE" CommandArgument="front" runat="server"
                                                                Text="保存"></asp:LinkButton>|<asp:LinkButton ID="lbtnDelete" CommandArgument="front"
                                                                    CommandName="DELETE" runat="server" Text="删除"></asp:LinkButton>
                                                        </td>
                                                    </tr>
                                                </ItemTemplate>
                                                <FooterTemplate>
                                                    <tr class="TB_Item">
                                                        <td>
                                                            <asp:Label ID="lblID" runat="server" Text='0'></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtSort_front" CssClass="Input_Short" runat="server" MaxLength="10"></asp:TextBox>
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="dropFontFamily_front" Width="90px" DataSource='<%# this.FontFamily %>'
                                                                DataTextField="Value" DataValueField="LookupCode" runat="server">
                                                            </asp:DropDownList>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtColor_front" CssClass="Input_Short" runat="server" MaxLength="10"></asp:TextBox>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtFontSize_front" CssClass="Input_Short" runat="server" MaxLength="3"></asp:TextBox>px
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtTop_front" CssClass="Input_Short" runat="server" MaxLength="3"></asp:TextBox>px
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtLeft_front" CssClass="Input_Short" runat="server" MaxLength="3"></asp:TextBox>px
                                                        </td>
                                                        <td>
                                                            <asp:RadioButtonList ID="rdbDirection_front" RepeatDirection="Horizontal" runat="server" onclick="loadfiled(this,'rdbDirection_front','front')" >
                                                                <asp:ListItem Selected="True" Value="R">向右</asp:ListItem>
                                                                <asp:ListItem Value="L">向左</asp:ListItem>
                                                            </asp:RadioButtonList>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtContent_front" runat="server" CssClass="Input_Middle" Text='<%# Eval("CONTENT") %>'
                                                                Width="90%" MaxLength="125"></asp:TextBox>
                                                        </td>
                                                        <td align="center">
                                                            <asp:LinkButton ID="lbtnAdd" runat="server" CommandName="NEW" CommandArgument="front"
                                                                Text="添加"></asp:LinkButton>
                                                        </td>
                                                    </tr>
                                                    <tr class="TB_Item">
                                                        <td colspan="10" align="center">
                                                            <asp:Button ID="btnSave" Text="保存全部正面字段" CommandName="SAVEALL" CommandArgument="front"
                                                                runat="server" />
                                                        </td>
                                                    </tr>
                                                    </table>
                                                </FooterTemplate>
                                            </asp:Repeater>
                                        </fieldset>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div id="tabs-2">
                            <table class="TB">
                                <tr class="TB_Header">
                                    <td align="left">
                                        反面图片[<a href="javascript:void(0);modifyImage('back');">修改</a>]：尺寸比例5*3，建议上传原图图片尺寸为1000*600（原图尺寸要大于400*240，系统会自动生成400*240小图供用名设计名片用）
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <div id="card_back" runat="server">
                                            <ul>
                                                <li id="li_card_back">
                                                    <asp:Image ID="backImg" runat="server" Style="border: 0px;" />
                                                    <asp:Literal ID="ltlBLogo" runat="server"></asp:Literal>
                                                </li>
                                            </ul>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table class="TB">
                                            <tr>
                                                <td class="TD_Input_Text" style="width: 70px;" valign="middle">
                                                    反面LOGO
                                                </td>
                                                <td rowspan="2" class="TD_Input" style="width: 50px;">
                                                    <asp:Image ID="BLogo" ImageUrl="/transparent.gif" Width="50px" Height="50px" runat="server" />
                                                </td>
                                                <td class="TD_Input" style="width: 200px;">
                                                    宽：<asp:TextBox ID="txtLogoWidthB" onkeyup="settingLogo('B',this);" Width="30px" MaxLength="3"
                                                        runat="server"></asp:TextBox>px 上边距：<asp:TextBox ID="txtLogoTopB" onkeyup="settingLogo('B',this);"
                                                            Width="30px" MaxLength="3" runat="server"></asp:TextBox>px
                                                    <asp:TextBox ID="txtLogoB" runat="server" Style="display: none"></asp:TextBox>
                                                </td>
                                                <td rowspan="2">
                                                    <asp:Button ID="btnSaveBLogo" runat="server" Text="保存" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="TD_Input_Text">
                                                    [<a href="javascript:void(0);picklogo('B');">修改</a>][<asp:LinkButton ID="lbtnDeleteBLogo"
                                                        CommandArgument="B" runat="server">删除</asp:LinkButton>]
                                                </td>
                                                <td class="TD_Input">
                                                    高：<asp:TextBox ID="txtLogoHeightB" onkeyup="settingLogo('B',this);" Width="30px"
                                                        MaxLength="3" runat="server"></asp:TextBox>px 左边距：<asp:TextBox ID="txtLogoLeftB"
                                                            onkeyup="settingLogo('B',this);" Width="30px" MaxLength="3" runat="server"></asp:TextBox>px
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr id="trBackFields">
                                    <td>
                                        <fieldset>
                                            <legend>【反面字段详情】</legend>
                                            <asp:Repeater ID="rptBackFieldList" runat="server">
                                                <HeaderTemplate>
                                                    <table class="TB">
                                                        <tr class="TB_Header">
                                                            <td style="width: 40px;">
                                                                ID
                                                            </td>
                                                            <td style="width: 60px;">
                                                                排序
                                                            </td>
                                                            <td style="width: 90px;">
                                                                字体
                                                            </td>
                                                            <td style="width: 60px;">
                                                                颜色
                                                            </td>
                                                            <td style="width: 70px;">
                                                                字符尺寸
                                                            </td>
                                                            <td style="width: 70px;">
                                                                上边距
                                                            </td>
                                                            <td style="width: 70px;">
                                                                左边距
                                                            </td>
                                                            <td style="width: 120px;">
                                                                文字方向
                                                            </td>
                                                            <td>
                                                                内容
                                                            </td>
                                                            <td style="width: 80px;">
                                                                操作
                                                            </td>
                                                        </tr>
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <tr class="TB_Alter back">
                                                        <td>
                                                            <asp:Label ID="lblID"  ft="front" runat="server" Text='<%# Eval("ID") %>'></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtSort_back" CssClass="Input_Short" runat="server" Text='<%# Eval("SORT") %>'
                                                                MaxLength="10"></asp:TextBox>
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="dropFontFamily_back" Width="90px" DataSource='<%# this.FontFamily %>'
                                                                onchange="loadfiled(this,'dropFontFamily_back','back')" DataTextField="Value"
                                                                DataValueField="LookupCode" runat="server">
                                                            </asp:DropDownList>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtColor_back" CssClass="Input_Short" runat="server" Text='<%# Eval("COLOR") %>'
                                                                onkeyup="loadfiled(this,'txtColor_back','back')" ft="back" MaxLength="10"></asp:TextBox>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtFontSize_back" CssClass="Input_Short" onkeyup="loadfiled(this,'txtFontSize_back','back')"
                                                                runat="server" Text='<%# Eval("FONT_SIZE") %>' MaxLength="3"></asp:TextBox>px
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtTop_back" CssClass="Input_Short" runat="server" Text='<%# Eval("POS_Y") %>'
                                                                onkeyup="loadfiled(this,'txtTop_back','back')" MaxLength="3"></asp:TextBox>px
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtLeft_back" CssClass="Input_Short" runat="server" Text='<%# Eval("POS_X") %>'
                                                                onkeyup="loadfiled(this,'txtLeft_back','back')" MaxLength="3"></asp:TextBox>px
                                                        </td>
                                                        <td>
                                                            <asp:RadioButtonList ID="rdbDirection_back" RepeatDirection="Horizontal" runat="server"
                                                                onchange="loadfiled(this,'rdbDirection_back','back')">
                                                                <asp:ListItem Selected="True" Value="R">向右</asp:ListItem>
                                                                <asp:ListItem Value="L">向左</asp:ListItem>
                                                            </asp:RadioButtonList>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtContent_back" runat="server" CssClass="Input_Middle" Text='<%# Eval("CONTENT") %>'
                                                                onkeyup="loadfiled(this,'txtContent_back','back')" Width="90%" MaxLength="125"></asp:TextBox>
                                                        </td>
                                                        <td align="center">
                                                            <asp:LinkButton ID="lbtnSave" CommandName="UPDATE" CommandArgument="back" runat="server"
                                                                Text="保存"></asp:LinkButton>|<asp:LinkButton ID="lbtnDelete" CommandArgument='back'
                                                                    CommandName="DELETE" runat="server" Text="删除"></asp:LinkButton>
                                                        </td>
                                                    </tr>
                                                </ItemTemplate>
                                                <FooterTemplate>
                                                    <tr class="TB_Item">
                                                        <td>
                                                            <asp:Label ID="lblID" runat="server" Text='0'></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtSort_back" CssClass="Input_Short" runat="server" MaxLength="10"></asp:TextBox>
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="dropFontFamily_back" Width="90px" DataSource='<%# this.FontFamily %>'
                                                                DataTextField="Value" DataValueField="LookupCode" runat="server">
                                                            </asp:DropDownList>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtColor_back" CssClass="Input_Short" runat="server" MaxLength="10"></asp:TextBox>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtFontSize_back" CssClass="Input_Short" runat="server" MaxLength="3"></asp:TextBox>px
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtTop_back" CssClass="Input_Short" runat="server" MaxLength="3"></asp:TextBox>px
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtLeft_back" CssClass="Input_Short" runat="server" MaxLength="3"></asp:TextBox>px
                                                        </td>
                                                        <td>
                                                            <asp:RadioButtonList ID="rdbDirection_back" RepeatDirection="Horizontal" runat="server">
                                                                <asp:ListItem Selected="True" Value="R">向右</asp:ListItem>
                                                                <asp:ListItem Value="L">向左</asp:ListItem>
                                                            </asp:RadioButtonList>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtContent_back" runat="server" CssClass="Input_Middle" Text='<%# Eval("CONTENT") %>'
                                                                Width="90%" MaxLength="125"></asp:TextBox>
                                                        </td>
                                                        <td align="center">
                                                            <asp:LinkButton ID="lbtnAdd" runat="server" CommandName="NEW" CommandArgument="back"
                                                                Text="添加"></asp:LinkButton>
                                                        </td>
                                                    </tr>
                                                    <tr class="TB_Item">
                                                        <td colspan="10" align="center">
                                                            <asp:Button ID="btnSave" Text="保存全部反面字段" CommandName="SAVEALL" CommandArgument="back"
                                                                runat="server" />
                                                        </td>
                                                    </tr>
                                                    </table>
                                                </FooterTemplate>
                                            </asp:Repeater>
                                        </fieldset>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>

<script type="text/javascript">
    load("front");
    load("back");
</script>

